/**
 * @description:
 *   温柔的提示控件， $.popper(sth) 会在页面中浮现一段文字作为提示
 *
 * @author soulran(xr@ethercap.com)
 */

module.exports = function(html, time){
    var popper = $.dom.create('div', {class: 'popper noblur'});
    popper.innerHTML = html;
    document.body.appendChild(popper);
    setTimeout(function(){
        popper.classList.add('fade');
        popper.classList.add('active');
    }, 100);
    setTimeout(function(){
        popper.classList.remove("active");
    }, time || 2600);
    setTimeout(function(){
        popper.remove();
    }, (time || 2600) + 400);
};
